<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>考勤汇总</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<a href="${ctx}/employee/outsourceCostDetail/summaryAttendance">考勤汇总</a>
	</ul>
	<form:form id="searchForm" modelAttribute="summaryAttendance" action="${ctx}/employee/outsourceCostDetail/summaryAttendance" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>员工编号：</label>
				<form:input path="employeeNumber" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>国家：</label>
				<sys:treeselect id="company" name="company.id" value="${summaryAttendance.company.id}" labelName="company.name" labelValue="${summaryAttendance.company.name}"
					title="仓库" url="/sys/office/treeData?type=1" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>

			<li><label>仓库：</label>
				<sys:treeselect id="office" name="office.id" value="${summaryAttendance.office.id}" labelName="office.name" labelValue="${summaryAttendance.office.name}"
					title="部门" url="/sys/office/treeData?type=2" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>
			<li><label>日期：</label>
				<input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${startDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> - 
				<input name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>			
				<th>国家</th>
				<th>员工类别</th>
				<th>成本中心</th>			
				<th>员工编号</th>
				<th>员工姓名</th>
				<th>开始时间</th>
				<th>结束日期</th>				
				<th>部门</th>				
				<th>仓库</th>	
				<th>应出勤小时数</th>
				<th>操作工时</th>
				<th>平时工时</th>											
				<th>法定假期工时</th>
				<th>带薪年假</th>
				<th>带薪病假</th>
				<th>调休假</th>
				<th>丧假 </th>								
				<th>产假</th>				
				<th>其他假期</th>
				<th>OT*1.25</th>
				<th>OT*1.5</th>
				<th>OT*2</th>
				<th>OT*2.5</th>
				<th>OT*3</th>
				<th>OT合计</th>
				<th>发薪工时</th>
				<th>备注</th>
				</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="summaryAttendance">
			<tr>								
				<td>
					${summaryAttendance.company.name}
				</td>
				<td>
					${fns:getDictLabel(summaryAttendance.employeeType, 'employee_type', '')}
				</td>
				<td></td>								
				<td>
					${summaryAttendance.employeeNumber}
				</td>
				<td>
					${summaryAttendance.name}
				</td>
				<td>
					<fmt:formatDate value="${startDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${fns:getDictLabel(summaryAttendance.department, 'department_type', '')}
				</td>					
				<td>
					${summaryAttendance.office.name}
				</td>
				<td>
					${summaryAttendance.shiftWorktime}
				</td>
				<td>
					${summaryAttendance.wageHour}
				</td>
				<td>
					${summaryAttendance.normalHour}
				</td>
				
				<td>
					${summaryAttendance.holiday}
				</td>				
				<td>
					${summaryAttendance.annualLeave}
				</td>
				<td>
					${summaryAttendance.stickLeave}
				</td>
				<td>
					${summaryAttendance.paidLeaveDay}
				</td>				
				<td>
					${summaryAttendance.funeralLeaveDay}
				</td>
				<td>
					${summaryAttendance.antenatalLeave}
				</td>
				<td>
					${otherLeaveDay}
				</td>
				
				<td>
					0
				</td>
				<td>
					${summaryAttendance.overtimeHour}
				</td>
				<td>
					0
				</td>
				<td>
					0
				</td>
				<td>
					0
				</td>
				<td>
					${summaryAttendance.overtimeHour}
				</td>
				<td>
					${summaryAttendance.wageHour}
				</td>
				<td>					
				</td>	
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>